
public class Worker {

	String name;
	double money;
	
	public Worker(String name, double money) {

		this.name = name;
		this.money = money;
	}

	public boolean purchase(Sandwich s) {

		if (this.money >= s.price) {
			this.money -= s.price;
			return true;
		} else {

			return false;
		}

	}
}
